<?php defined('APP_PATH') or exit('Access Denied');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改密码</title>
<link rel="stylesheet" type="text/css" href="vonuo/static/css/vonuo.css">
<script type="text/javascript" src="vonuo/static/js/jquery.min.js"></script>
<script type="text/javascript">
function check(){
	if($.trim($("#old_pass").val()).match(/^[a-zA-Z0-9]{5,20}$/g) == null){
		$("#old_pass_info").html("<strong>密码格式为[5-20]位字母和数字组成！</strong>");
		$("#old_pass").focus();
		return false;
	}else{
		$("#old_pass_info").html("<strong>√</strong>");
	}
	if($.trim($("#new_pass").val()).match(/^[a-zA-Z0-9]{5,20}$/g) == null){
		$("#new_pass_info").html("<strong>密码格式为[5-20]位字母和数字组成！</strong>");
		$("#new_pass").focus();
		return false;
	}else{
		$("#new_pass_info").html("<strong>√</strong>");
	}
	if($.trim($("#user_pass_confirm").val()) != $.trim($("#new_pass").val())){
		$("#pass_confirm_info").html("<strong'>两次输入的密码不一致！</strong>");
		$("#user_pass_confirm").focus();
		return false;
	}else{
		$("#pass_confirm_info").html("<strong>√</strong>");
	}
	$("form").submit();
}
</script>
</head>

<body>
<div class="gs_wraper">
	<div class="psd">
		<h3 class="txt_blue">修改密码</h3>
		<div class="yellow_box txt_orange">为了更好的保护您的帐号安全，避免受到损失，建议您设置密码时不要设置过于简单的密码。</div>
		<table border="0" cellspacing="0" cellpadding="0" class="reg_table m_auto">
		<form action="<?php echo spUrl('admin','chpwd');?>" method="post">
			<tr>
				<td class="l_td">原密码：</td>
				<td><input id="old_pass" name="old_pass" type="password" class="reg_put w_200" /></td>
				<td><span id="old_pass_info" style="margin-left:10px;color:red;"></span></td>
			</tr>
			<tr class="reg_yz_tips"><td colspan="3">&nbsp;</td></tr>
			<tr>
				<td class="l_td">新密码：</td>
				<td><input id="new_pass" name="new_pass" type="password" class="reg_put w_200" /></td>
				<td><span id="new_pass_info" style="margin-left:10px;color:red;"></span></td>
			</tr>
			<tr class="reg_yz_tips"><td colspan="3">&nbsp;</td></tr>
			<tr>
				<td class="l_td">确　认：</td>
				<td><input id="user_pass_confirm" type="password" class="reg_put w_200" /></td>
				<td><span id="pass_confirm_info" style="margin-left:10px;color:red;"></span></td>
			</tr>
			<tr class="reg_yz_tips"><td colspan="3">&nbsp;</td></tr>
			<tr class="reg_yz_tips">
				<td>&nbsp;</td>
				<td colspan="2"><a href="javascript:;" onclick="check()" class="sure_submit f_left time">确 定</a></td>
			</tr>
		</form>
		</table>
	</div>
</div>
</body>
</html>